home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10059 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: mcrware.microware.com!jejones
  2. From: jejones@microware.com (James Jones)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Encapsulation question.
  5. Date: 5 Mar 1996 23:19:20 GMT
  6. Organization: Microware Systems Corp., Des Moines, Iowa
  7. Message-ID: <4hii5o$bpf@mcrware.microware.com>
  8. References: <4hg701$goi@insosf1.netins.net>
  9. NNTP-Posting-Host: mork.microware.com
  10.  
  11. In article <4hg701$goi@insosf1.netins.net> hhowe@trgnet.com (Harold Howe) writes:
  12. >Does the following violate encapsulation?  Should an object tell a private 
  13. >member the address of other private members?  I am using this on a grander 
  14. >scale, in which the Application class tells a private dialog object the 
  15. >address of a private configuration structure?  The dialog class needs access 
  16. >to the structure so it can modify it, and this is how I tell the dialog where 
  17. >to look.  Aside from using globals, does anyone have any better suggestions?
  18.  
  19. I think that the "friend" facility is supposed to provide for that sort
  20. of underhanded action.
  21.  
  22.     James Jones
  23.  
  24. Opinions herein are those of the author, and not necessarily those of any
  25. organization.
  26.